package com.bytedance.common.plugin.baseface;

import android.content.res.Resources;
import android.util.Log;

import com.bytedance.common.plugin.mop.MopAdapter;
import com.bytedance.common.plugin.mop.MopAgent;
import com.bytedance.common.plugin.mop.TargetType;

import java.util.Map;

public abstract class BaseProxy extends MopAdapter {
    private BasePlugin mPlugin;

    public BaseProxy() {

    }

    @MopAgent(targetType = TargetType.Plugin)
    public Boolean check(String pluginName) {
        Boolean result = Boolean.TRUE;
        Object obj = this.mopFuncSingle(new Class[]{String.class}, new Object[]{pluginName});
        if (obj instanceof Boolean) {
            result = (Boolean) obj;
        }
        return result;
    }

    public BasePlugin getPlugin() {
        return this.mPlugin;
    }

    @MopAgent(targetType = TargetType.Plugin)
    public void setHostResMap(Map arg6, String arg7) {
        this.mopAction(new Class[]{Map.class, String.class}, new Object[]{arg6, arg7});
    }

    public void setPlugin(BasePlugin basePlugin) {
        this.mPlugin = basePlugin;
    }

    @MopAgent(targetType = TargetType.Plugin)
    public void setPluginRes(Resources resources, String arg7) {
        this.mopAction(new Class[]{Resources.class, String.class}, new Object[]{resources, arg7});
    }
}

